﻿using System;

using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ThaiHoa.Win.QLSX.Entity;
using ThaiHoa.Win.QLSX.DAL;

namespace ThaiHoa.Win.QLSX.QLKH
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            KhoDBContext db = new KhoDBContext();
            List<DoiTac> danhSachDoiTac;
            danhSachDoiTac = db.DoiTac.Where(d => d.TrangThai).ToList();
            foreach (DoiTac item in danhSachDoiTac)
            {
                label1.Text+= string.Format("Ten don vi :{0} | Dia Chi : {1}", item.TenDonVi, item.DiaChi);
            }
        }
    }
}
